﻿package  {
	
	public class Input {
				
		private var keyEvents:Array; // berisi bool untuk kiri, atas, kanan, bawah		
		
		public function Input() {
			keyEvents = new Array();
		}			
		
		public function keyPressed(keyCode:int) {
			keyEvents[keyCode] = true;
		}
		
		public function keyReleased(keyCode:int) {
			keyEvents[keyCode] = false;
		}
		
		public function isKeyPressed(keyCode:int):Boolean{
			return keyEvents[keyCode];
		}
	}
	
}